openapi: 3.0.0
paths:
  /customers:
    post:
      description: >-
        Creates a new customer for the authenticated account with the provided
        details.
      operationId: CustomersController_create
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomersCreatePublicDto'
      responses:
        '200':
          description: Created customer details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersPublicDto'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersPublicDto'
        '400':
          description: Invalid input data for creating a customer
      summary: Creates a new customer
      tags:
        - Customers
    get:
      description: >-
        Retrieves a paginated list of customers associated with the
        authenticated account.
      operationId: CustomersController_getAllByAccount
      parameters:
        - name: search
          required: false
          in: query
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: order
          required: false
          in: query
          schema:
            default: ASC
            type: string
            enum:
              - ASC
              - DESC
        - name: sortingField
          required: false
          in: query
          schema:
            default: createdAt
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Paginated list of customers
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomersPublicDto'
        '400':
          description: Invalid or corrupted API key
      summary: Get paginated list of customers
      tags:
        - Customers
  /customers/search:
    get:
      description: >-
        Searches for customers associated with the authenticated account based
        on a search string that matches their name or email.
      operationId: CustomersController_search
      parameters:
        - name: search
          required: false
          in: query
          description: Search string to filter customers by name or email
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Found customers list, or empty array if none found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerPublicOutputDto'
        '400':
          description: Invalid or corrupted API key
      summary: Search customers by name or email
      tags:
        - Customers
  /customers/{externalKey}:
    get:
      description: >-
        Retrieves detailed information about a specific customer using their
        External Key.
      operationId: CustomersController_getDetails
      parameters:
        - name: externalKey
          required: true
          in: path
          description: External Key of the customer to retrieve details for
          schema:
            example: cus_c93f7e842b89b9f7cad17918
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Customer details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersPublicDto'
        '404':
          description: Customer details not found
      summary: Get customer details by External Key
      tags:
        - Customers
    patch:
      description: >-
        Updates the details of a specific customer using their External Key and
        the provided update data.
      operationId: CustomersController_update
      parameters:
        - name: externalKey
          required: true
          in: path
          description: External Key of the customer to update
          schema:
            example: cus_c93f7e842b89b9f7cad17918
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerDto'
      responses:
        '200':
          description: Number of records updated
          content:
            application/json:
              schema:
                type: number
        '400':
          description: Invalid input data for updating customer
      summary: Update customer details by External Key
      tags:
        - Customers
    delete:
      description: >-
        Deletes a specific customer associated with the authenticated account
        using their External Key.
      operationId: CustomersController_remove
      parameters:
        - name: externalKey
          required: true
          in: path
          description: External Key of the customer to delete
          schema:
            example: cus_c93f7e842b89b9f7cad17918
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Number of records deleted
          content:
            application/json:
              schema:
                type: number
        '400':
          description: Invalid request for deleting customer
      summary: Delete a customer by External Key
      tags:
        - Customers
  /customers/{externalKey}/payment-methods:
    get:
      description: >-
        Retrieves a paginated list of all payment methods associated with a
        specific customer.
      operationId: CustomersController_getPaymentMethods
      parameters:
        - name: search
          required: false
          in: query
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: externalKey
          required: true
          in: path
          description: External Key of the customer whose payment methods are to be listed
          schema:
            example: cus_c93f7e842b89b9f7cad17918
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List customer payment methods
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
        '400':
          description: Invalid request for listing customer payment methods
      summary: List customer payment methods
      tags:
        - Customers
  /customers/{externalKey}/payment-methods/{id}:
    get:
      description: >-
        Retrieves detailed information about a specific payment method
        associated with a customer.
      operationId: CustomersController_getPaymentMethod
      parameters:
        - name: externalKey
          required: true
          in: path
          description: External Key of the customer
          schema:
            example: cus_c93f7e842b89b9f7cad17918
            type: string
        - name: id
          required: true
          in: path
          description: ID of the payment method to retrieve details for
          schema:
            example: pm_1234567890abcdef
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Customer payment method details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
        '400':
          description: Invalid request for retrieving customer payment method details
      summary: Get customer payment method details
      tags:
        - Customers
  /products/taxCodes:
    get:
      description: >-
        Retrieves a list of tax codes with their associated category names.
        Optionally filter by search term.
      operationId: ProductsController_getTaxesCodes
      parameters:
        - name: search
          required: false
          in: query
          description: Search by tax codes or category names
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved tax codes with category names
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                example:
                  txcd_92010001: Shipping
                  txcd_20030000: General - Services
        '400':
          description: Invalid or corrupted API key
      summary: Get tax codes with category names
      tags:
        - Products
  /products:
    get:
      description: >-
        Retrieves a paginated list of all products for the authenticated
        account. Supports pagination and search functionality.
      operationId: ProductsController_listAllProducts
      parameters:
        - name: search
          required: false
          in: query
          description: |-
            {"active":true, 
                "tax_code":"txcd_10000000",
                "ids":"prod_299eea6f29146d93aaa4bceb,prod_cc5b3aa61adca9f52747dd40",
                "created[gt|gte|lt|lte]":1766066322}
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of products
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductPublicDto'
                  meta:
                    type: object
                    properties:
                      page:
                        type: number
                        example: 1
                        description: Current page number
                      take:
                        type: number
                        example: 10
                        description: Number of items per page
                      itemsTotal:
                        type: number
                        example: 50
                        description: Total number of items
                      pagesTotal:
                        type: number
                        example: 5
                        description: Total number of pages
        '400':
          description: Invalid or missing API key
      summary: List all products
      tags:
        - Products
    post:
      description: >-
        Creates a new product with the specified details. The product name must
        be unique and follow specific naming conventions.
      operationId: ProductsController_createProduct
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductPublicDto'
      responses:
        '201':
          description: Product successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPublicDto'
        '400':
          description: Invalid or missing API key
      summary: Create a product
      tags:
        - Products
  /products/{id}:
    get:
      description: Retrieves details of a specific product by its unique identifier.
      operationId: ProductsController_retrieveProduct
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the product
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPublicDto'
        '400':
          description: Invalid or missing API key
      summary: Retrieve a product
      tags:
        - Products
    patch:
      description: >-
        Updates an existing product with the specified details. Only provided
        fields will be updated.
      operationId: ProductsController_updateProduct
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the product to update
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: Product update data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProductPublicDto'
            examples:
              Update Product:
                value:
                  name: premium_plan_updated
                  description: Updated premium plan
                  tax_code: txcd_20030000
      responses:
        '200':
          description: Product successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPublicDto'
        '400':
          description: Invalid or missing API key
        '404':
          description: Product not found
      summary: Update a product
      tags:
        - Products
    delete:
      description: Permanently deletes a product. This action cannot be undone.
      operationId: ProductsController_deleteProduct
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the product to delete
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Product successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
                  deleted:
                    type: boolean
                    example: true
        '400':
          description: Invalid or missing API key
        '404':
          description: Product not found
      summary: Delete a product
      tags:
        - Products
  /transactions:
    get:
      description: >-
        Retrieves a list of transactions for the current account, based on the
        authentication that was used to make the request.
      operationId: TransactionsController_getTransactions
      parameters:
        - name: search
          required: false
          in: query
          schema:
            format: json
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
      summary: List all transactions
      tags:
        - Transactions
  /transactions/{id}:
    get:
      description: >-
        Retrieves detailed information about a specific transaction for the
        current account, based on the authentication that was used to make the
        request.
      operationId: TransactionsController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: Transaction ID
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Transaction details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionPublicDto'
      summary: Retrieve a transaction
      tags:
        - Transactions
  /invoices:
    get:
      description: >-
        Retrieves a paginated list of all invoices for the authenticated
        account. Supports pagination and filtering.
      operationId: InvoicesController_listInvoices
      parameters:
        - name: search
          required: false
          in: query
          description: |-
            {"status":"open,draft,paid,void", 
                    "customer":"cus_fa66daabf0b474b167e1d46c"}
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of invoices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
        '400':
          description: Invalid or corrupted API key
      summary: List all invoices
      tags:
        - Invoices
    post:
      description: >-
        Creates a new invoice for a customer. The invoice will include line
        items, pricing, taxes, and other billing information. The invoice will
        be in draft status until paid or committed.
      operationId: InvoicesController_createInvoice
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoicePublicDto'
      responses:
        '201':
          description: Invoice successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesPublicDto'
        '400':
          description: Invalid input data or corrupted API key
        '404':
          description: Customer or price not found
      summary: Create an invoice
      tags:
        - Invoices
  /invoices/{id}:
    get:
      description: >-
        Retrieves a specific invoice by its unique identifier, including all
        invoice details, line items, and payment information.
      operationId: InvoicesController_retrieveInvoice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the invoice
          schema:
            example: 84c413b1-cda9-4637-a75d-352e36274bf2
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved the invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesPublicDto'
        '400':
          description: Invalid or corrupted API key
      summary: Retrieve an invoice
      tags:
        - Invoices
    put:
      description: >-
        Pays an invoice. This action will attempt to charge the customer using
        the payment method on file and finalize the invoice.
      operationId: InvoicesController_payInvoice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the invoice to pay
          schema:
            example: 84c413b1-cda9-4637-a75d-352e36274bf2
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invoice successfully paid
        '400':
          description: Invalid or corrupted API key, or invoice cannot be paid
        '404':
          description: Invoice not found
      summary: Pay an invoice
      tags:
        - Invoices
    delete:
      description: >-
        Voids a draft or open invoice. A voided invoice cannot be paid and is
        marked as cancelled. This action is irreversible.
      operationId: InvoicesController_voidInvoice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the invoice to void
          schema:
            example: 84c413b1-cda9-4637-a75d-352e36274bf2
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invoice successfully voided
        '400':
          description: Invalid or corrupted API key, or invoice cannot be voided
        '404':
          description: Invoice not found
      summary: Void an invoice
      tags:
        - Invoices
  /invoices/{id}/transactions:
    get:
      description: >-
        Retrieves a paginated list of all transactions associated with a
        specific invoice, including payment attempts, refunds, and adjustments.
      operationId: InvoicesController_getTransactions
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: search
          required: false
          in: query
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of invoice transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
        '400':
          description: Invalid or corrupted API key
        '404':
          description: Invoice not found
      summary: List invoice transactions
      tags:
        - Invoices
  /invoices/{id}/transactions/{transactionId}:
    get:
      description: >-
        Retrieves detailed information about a specific transaction associated
        with an invoice.
      operationId: InvoicesController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the invoice
          schema:
            example: 84c413b1-cda9-4637-a75d-352e36274bf2
            type: string
        - name: transactionId
          required: true
          in: path
          description: Unique identifier of the transaction
          schema:
            example: 1ac67144-c4eb-4977-a185-674278685a5f
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved transaction details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionPublicDto'
        '400':
          description: Invalid or corrupted API key
        '404':
          description: Invoice or transaction not found
      summary: Retrieve invoice transaction
      tags:
        - Invoices
  /taxRates:
    get:
      description: >-
        Retrieves a paginated list of all tax rates for the authenticated
        account. Supports pagination and filtering.
      operationId: TaxesController_findAll
      parameters:
        - name: search
          required: false
          in: query
          description: |-
            {"active":true, 
                  "inclusive":false,
                  "created[gt|gte|lt|lte]":1766066322}
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of tax rates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
        '400':
          description: Invalid or corrupted API key
      summary: List all tax rates
      tags:
        - TaxRates
    post:
      description: >-
        Creates a new tax rate for the authenticated account. Tax rates define
        the percentage of tax to be applied to transactions.
      operationId: TaxesController_createTaxRate
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: Tax rate data to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaxPublicDto'
            examples:
              example1:
                summary: Basic tax rate
                value:
                  display_name: Sales Tax
                  percentage: 8.5
                  inclusive: false
                  active: true
      responses:
        '201':
          description: Tax rate successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxesPublicDto'
        '400':
          description: Invalid input data or corrupted API key
      summary: Create a tax rate
      tags:
        - TaxRates
  /taxRates/{id}:
    get:
      description: Retrieves a specific tax rate by its unique identifier.
      operationId: TaxesController_retrieveTaxRate
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the tax rate
          schema:
            example: txr_inQ4hbLZPyljDXFRCEnjtEqK
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved the tax rate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxesPublicDto'
        '400':
          description: Invalid or corrupted API key
      summary: Retrieve a tax rate
      tags:
        - TaxRates
    patch:
      description: >-
        Updates an existing tax rate by its unique identifier. Only the provided
        fields will be updated.
      operationId: TaxesController_updateTaxRate
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the tax rate to update
          schema:
            example: txr_inQ4hbLZPyljDXFRCEnjtEqK
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxPublicDto'
      responses:
        '200':
          description: Tax rate successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxesPublicDto'
        '400':
          description: Invalid input data or corrupted API key
      summary: Update a tax rate
      tags:
        - TaxRates
  /prices:
    get:
      description: >-
        Retrieves a paginated list of all prices for the authenticated account.
        Supports pagination and search functionality.
      operationId: PricesController_listAllPrices
      parameters:
        - name: search
          required: false
          in: query
          description: |-
            {"active":true, 
                  "inclusive":false,
                  "currency":"usd",
                  "type":"recurring|one_time",
                  "product":"prod_5S8Wt9GNRDxZ7Tjy6g9KKBb5",
                  "created[gt|gte|lt|lte]":1766066322}
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of prices
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PricePublicDto'
                  meta:
                    type: object
                    properties:
                      page:
                        type: number
                        example: 1
                      take:
                        type: number
                        example: 10
                      itemsTotal:
                        type: number
                        example: 50
                      pagesTotal:
                        type: number
                        example: 5
        '400':
          description: Invalid or missing API key
      summary: List all prices
      tags:
        - Prices
  /prices/{id}:
    get:
      description: Retrieves details of a specific price by its unique identifier.
      operationId: PricesController_retrievePrice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the price
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: price_1SGKTmDZYOQH9uHk1vaSxPKa
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved price
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricePublicDto'
        '400':
          description: Invalid or missing API key
      summary: Retrieve a price
      tags:
        - Prices
    post:
      description: >-
        Creates a new price for an existing product. The price can be one-time
        or recurring (subscription-based).
      operationId: PricesController_createPrice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the product to add the price to
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: Price creation data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePricePublicDto'
            examples:
              Recurring Price:
                value:
                  currency: USD
                  unit_amount: 2999
                  type: recurring
                  recurring:
                    interval: month
                    interval_count: 1
                  tax_behavior: exclusive
                  description: Monthly subscription
              One-time Price:
                value:
                  currency: USD
                  unit_amount: 9999
                  type: one_time
                  recurring: null
                  tax_behavior: exclusive
                  description: One-time purchase
      responses:
        '201':
          description: Price successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricePublicDto'
        '400':
          description: Invalid or missing API key
        '404':
          description: Product not found
      summary: Create a price for a product
      tags:
        - Prices
    delete:
      description: >-
        Permanently deletes a price. This action cannot be undone. Active prices
        associated with active subscriptions should be deactivated instead of
        deleted.
      operationId: PricesController_deletePrice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the price to delete
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: price_1SGKTmDZYOQH9uHk1vaSxPKa
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Price successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: price_1SGKTmDZYOQH9uHk1vaSxPKa
                  deleted:
                    type: boolean
                    example: true
        '400':
          description: Invalid or missing API key
        '404':
          description: Price not found
      summary: Delete a price
      tags:
        - Prices
  /prices/{id}/inactive:
    patch:
      description: >-
        Updates an inactive price with new details. Only inactive prices can be
        fully updated with this endpoint.
      operationId: PricesController_updateInactivePrice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the inactive price to update
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: price_1SGKTmDZYOQH9uHk1vaSxPKa
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: Price update data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePricePublicDto'
            examples:
              Update Recurring Price:
                value:
                  currency: USD
                  unit_amount: 3999
                  type: recurring
                  recurring:
                    interval: month
                    interval_count: 1
                  tax_behavior: exclusive
                  description: Updated monthly subscription
      responses:
        '200':
          description: Price successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricePublicDto'
        '400':
          description: Invalid or missing API key
        '404':
          description: Price not found
      summary: Update an inactive price
      tags:
        - Prices
  /prices/{id}/active:
    patch:
      description: >-
        Updates metadata of an active price. Only the description field can be
        modified for active prices to maintain billing consistency.
      operationId: PricesController_updateActivePrice
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the active price to update
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: price_1SGKTmDZYOQH9uHk1vaSxPKa
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: >-
          Price metadata update data (only description can be updated for active
          prices)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePriceDto'
            examples:
              Update Description:
                value:
                  description: Updated description for active price
      responses:
        '200':
          description: Price metadata successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricePublicDto'
        '400':
          description: Invalid or missing API key
        '404':
          description: Price not found
      summary: Update an active price
      tags:
        - Prices
  /subscriptions:
    get:
      description: >-
        Retrieves a paginated list of all subscriptions for the authenticated
        account. Supports pagination and filtering.
      operationId: SubscriptionsController_listSubscriptions
      parameters:
        - name: search
          required: false
          in: query
          description: |-
            {"status":"active|cancelled|paused|scheduled|expired|trial", 
                  "customer":"cus_fa66daabf0b474b167e1d46c"}
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved paginated list of subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
        '400':
          description: Invalid or corrupted API key
      summary: List all subscriptions
      tags:
        - Subscriptions
    post:
      description: >-
        Creates a new subscription for a customer. The subscription will include
        product items, pricing, and billing information.
      operationId: SubscriptionsController_createSubscription
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionPublicDto'
      responses:
        '201':
          description: Subscription successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsPublicDto'
        '400':
          description: Invalid input data or corrupted API key
        '404':
          description: Customer or price not found
      summary: Create a subscription
      tags:
        - Subscriptions
  /subscriptions/{id}:
    get:
      description: Retrieves a specific subscription by its unique identifier.
      operationId: SubscriptionsController_retrieveSubscription
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the subscription
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: sub_2FdhgypnsJQn9mZlY5qGaElL
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved the subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsPublicDto'
        '400':
          description: Invalid or corrupted API key
        '404':
          description: Subscription not found
      summary: Retrieve a subscription
      tags:
        - Subscriptions
    patch:
      description: >-
        Updates an existing subscription by its unique identifier. Can modify
        items, pricing, billing information, and other subscription details.
      operationId: SubscriptionsController_updateSubscription
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the subscription to update
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: sub_2FdhgypnsJQn9mZlY5qGaElL
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionPublicDto'
      responses:
        '200':
          description: Subscription successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsPublicDto'
        '400':
          description: Invalid input data or corrupted API key
        '404':
          description: Subscription not found
      summary: Update a subscription
      tags:
        - Subscriptions
    delete:
      description: >-
        Cancels an active subscription. The subscription will be terminated
        immediately or at the end of the current billing period based on
        configuration.
      operationId: SubscriptionsController_cancelSubscription
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the subscription to cancel
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: sub_2FdhgypnsJQn9mZlY5qGaElL
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Subscription successfully cancelled
        '400':
          description: Invalid or corrupted API key
        '404':
          description: Subscription not found
      summary: Cancel a subscription
      tags:
        - Subscriptions
  /subscriptions/{id}/pause:
    post:
      description: >-
        Pauses an active subscription. No charges will be made while the
        subscription is paused. The subscription can be resumed later.
      operationId: SubscriptionsController_pauseSubscription
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the subscription to pause
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: sub_2FdhgypnsJQn9mZlY5qGaElL
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Subscription successfully paused
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: string
        '400':
          description: Invalid or corrupted API key, or subscription cannot be paused
        '404':
          description: Subscription not found
      summary: Pause a subscription
      tags:
        - Subscriptions
  /subscriptions/{id}/resume:
    post:
      description: >-
        Resumes a paused subscription. Billing will continue from where it was
        paused, and the subscription will be active again.
      operationId: SubscriptionsController_resumeSubscription
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the subscription to resume
          schema:
            pattern: ^[a-z]+_[a-zA-Z0-9]+$
            example: sub_2FdhgypnsJQn9mZlY5qGaElL
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Subscription successfully resumed
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: string
        '400':
          description: Invalid or corrupted API key, or subscription is not paused
        '404':
          description: Subscription not found
      summary: Resume a subscription
      tags:
        - Subscriptions
  /balance:
    get:
      description: >-
        Retrieves the current account balance, based on the authentication that
        was used to make the request.
      operationId: BalanceController_getBalance
      parameters:
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancePublicDto'
      summary: Retrieve balance
      tags:
        - Balance
  /payment-methods:
    get:
      description: >-
        Retrieves a list of payment methods for the current account, based on
        the authentication that was used to make the request.
      operationId: PaymentMethodsController_getPaymentMethods
      parameters:
        - name: search
          required: false
          in: query
          schema:
            default: ''
            type: string
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 50
            default: 10
            type: number
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of payment methods
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageDto'
      summary: List all payment methods
      tags:
        - Payment Methods
  /payment-methods/{id}:
    get:
      description: >-
        Retrieves detailed information about a specific payment method for the
        current account, based on the authentication that was used to make the
        request.
      operationId: PaymentMethodsController_getPaymentMethod
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment method details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
      summary: Retrieve a payment method
      tags:
        - Payment Methods
  /payment-methods/{id}/attach:
    post:
      description: >-
        Attaches a payment method to a customer for the current account, based
        on the authentication that was used to make the request.
      operationId: PaymentMethodsController_attachPaymentMethod
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachPaymentMethodPublicRequestDto'
      responses:
        '200':
          description: Payment method details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
      summary: Attach a payment method
      tags:
        - Payment Methods
  /payment-methods/{id}/detach:
    post:
      description: >-
        Detaches a payment method from a customer for the current account, based
        on the authentication that was used to make the request.
      operationId: PaymentMethodsController_detachPaymentMethod
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: cc-api-key
          in: header
          description: Chaching API Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment method details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodPublicDto'
      summary: Detach a payment method
      tags:
        - Payment Methods
info:
  title: Chaching API
  description: >-
    Chaching is a modern subscription-billing platform designed to simplify
    product management, customer lifecycle workflows, and recurring payments. It
    combines a clean dashboard for business users with a powerful API built for
    developers who need full automation and control.
  version: '1.0'
  contact: {}
tags:
  - name: Customers
    description: >-
      This object represents a customer of your business. Use it to create
      recurring charges, save payment and contact information, and track
      payments that belong to the same customer.
  - name: Products
    description: "Products describe the specific goods or services you offer to your customers.\_For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product."
  - name: Transactions
    description: Transactions represent the payments and charges made by your customers.
  - name: Invoices
    description: >-
      Invoices are statements of amounts owed by a customer, and are either
      generated one-off, or generated periodically from a subscription.
  - name: TaxRates
    description: TaxRates allow you to calculate the tax to collect from your customer.
  - name: Prices
    description: >-
      This object represents a price in your Chaching account. Use it to define
      the cost of your products, configure one-time or recurring billing
      intervals, specify tax behavior, and manage pricing updates or
      deactivations for your offerings.
  - name: Subscriptions
    description: >-
      Subscriptions are a way to charge your customers on a recurring basis.
      They can be used for products or services that are delivered over time,
      such as memberships or software licenses.
  - name: Balance
    description: >-
      Balances represent the amount of money in your account. You can use
      balances to track your income and expenses, and to make payments to your
      customers or vendors.
  - name: Payment Methods
    description: >-
      Payment Methods represent a way to collect payment from your customers.
      They can be attached to customers to make charging easier and more
      efficient.
servers: []
components:
  schemas:
    Address:
      type: object
      properties:
        city:
          type: string
          description: City, district, suburb, town, or village.
          example: San Francisco
        country:
          type: string
          description: Two-letter country code(ISO 3166 - 1 alpha - 2).
          example: US
        line1:
          type: string
          description: Address line 1(e.g., street, PO Box, or company name).
          example: 123 Market St
        line2:
          type: string
          description: Address line 2(e.g., apartment, suite, unit, or building).
          example: Apt 4B
        postal_code:
          type: string
          description: ZIP or postal code.
          example: '94103'
        state:
          type: string
          description: State, county, province, or region.
          example: CA
    Shipping:
      type: object
      properties:
        name:
          type: string
          description: The name of the recipient.
          example: John Doe
        phone:
          type: string
          description: The phone number of the recipient.
          example: +1 (555) 123-4567
        address:
          description: The address of the recipient.
          allOf:
            - $ref: '#/components/schemas/Address'
      required:
        - name
        - phone
        - address
    CustomersCreatePublicDto:
      type: object
      properties:
        name:
          type: string
          description: The full name or business name of the customer.
          example: John Doe
        email:
          type: string
          description: The customer’s email address.
          example: john.doe@example.com
        description:
          type: string
          description: >-
            An arbitrary string attached to the object. Often useful for
            displaying to users.
          example: My First Test Customer
        phone:
          type: string
          description: The customer’s phone number.
          example: null
        currency:
          type: string
          description: Three-letter ISO currency code
          example: USD
        address:
          description: The customer’s address.
          type: array
          items:
            $ref: '#/components/schemas/Address'
        shipping:
          description: >-
            The customer’s shipping information. Appears on invoices emailed to
            this customer.
          allOf:
            - $ref: '#/components/schemas/Shipping'
      required:
        - name
    CustomersPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: cus_NffrFeUfNV2Hib
        object:
          type: string
          description: The type of the object.
          example: customer
        name:
          type: string
          description: The full name or business name of the customer.
          example: John Doe
        email:
          type: string
          description: The customer’s email address.
          example: john.doe@example.com
        description:
          type: string
          description: >-
            An arbitrary string attached to the object. Often useful for
            displaying to users.
          example: My First Test Customer
        phone:
          type: string
          description: The customer’s phone number.
          example: null
        created:
          type: number
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
          example: 1680893993
        currency:
          type: string
          description: Three-letter ISO currency code
          example: USD
        address:
          description: The customer’s address.
          type: array
          items:
            $ref: '#/components/schemas/Address'
        shipping:
          description: >-
            The customer’s shipping information. Appears on invoices emailed to
            this customer.
          allOf:
            - $ref: '#/components/schemas/Shipping'
      required:
        - id
        - object
        - name
        - created
    CustomerPublicOutputDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
      required:
        - id
        - name
        - email
    BillingAddressDto:
      type: object
      properties:
        email:
          type: string
          maxLength: 128
          format: email
        address1:
          type: string
          maxLength: 100
        address2:
          type: string
          maxLength: 100
        postalCode:
          type: string
          maxLength: 16
        city:
          type: string
          maxLength: 50
        country:
          type: string
          maxLength: 50
        state:
          type: string
          maxLength: 50
        phone:
          type: string
          maxLength: 25
    ShippingAddressDto:
      type: object
      properties:
        shippingAddress1:
          type: string
          maxLength: 100
        shippingAddress2:
          type: string
          maxLength: 100
        shippingPostalCode:
          type: string
          maxLength: 16
        shippingCity:
          type: string
          maxLength: 50
        shippingCountry:
          type: string
          maxLength: 50
        shippingState:
          type: string
          maxLength: 50
        shippingPhone:
          type: string
          maxLength: 25
    UpdateCustomerDto:
      type: object
      properties:
        email:
          type: string
          maxLength: 128
          format: email
        name:
          type: string
          maxLength: 100
        billingAddress:
          $ref: '#/components/schemas/BillingAddressDto'
        shippingAddress:
          $ref: '#/components/schemas/ShippingAddressDto'
    PageMetaDto:
      type: object
      properties:
        page:
          type: number
        take:
          type: number
        itemsTotal:
          type: number
        pagesTotal:
          type: number
      required:
        - page
        - take
        - itemsTotal
        - pagesTotal
    PageDto:
      type: object
      properties:
        data:
          type: array
          items:
            type: array
        meta:
          $ref: '#/components/schemas/PageMetaDto'
      required:
        - data
        - meta
    PaymentMethodAddressDto:
      type: object
      properties:
        city:
          type: string
          nullable: true
          example: null
          description: City of the billing address.
        country:
          type: string
          nullable: true
          example: null
          description: Country of the billing address.
        line1:
          type: string
          nullable: true
          example: null
          description: Street line 1 of the billing address.
        line2:
          type: string
          nullable: true
          example: null
          description: Street line 2 of the billing address.
        postal_code:
          type: string
          nullable: true
          example: null
          description: Postal or ZIP code.
        state:
          type: string
          nullable: true
          example: null
          description: State or province.
    PaymentMethodBillingDetailsDto:
      type: object
      properties:
        address:
          description: Billing address associated with the payment method.
          allOf:
            - $ref: '#/components/schemas/PaymentMethodAddressDto'
        email:
          type: string
          nullable: true
          example: null
          description: Billing email address.
        name:
          type: string
          nullable: true
          example: John Doe
          description: Full name of the account owner.
        phone:
          type: string
          nullable: true
          example: null
          description: Owner phone number.
      required:
        - address
        - name
    PaymentMethodNetworksDto:
      type: object
      properties:
        preferred:
          type: string
          example: ach
          description: Preferred bank transfer network.
        supported:
          example:
            - ach
          description: List of supported bank transfer networks.
          type: array
          items:
            type: string
      required:
        - preferred
        - supported
    PaymentMethodUsBankAccountDto:
      type: object
      properties:
        account_holder_type:
          type: string
          example: individual
          description: Type of account holder.
        account_type:
          type: string
          example: checking
          description: Bank account type.
        bank_name:
          type: string
          example: STRIPE TEST BANK
          description: Name of the bank.
        financial_connections_account:
          type: string
          nullable: true
          example: null
          description: Financial connections account reference if available.
        fingerprint:
          type: string
          example: LstWJFsCK7P349Bg
          description: Stripe fingerprint identifying the bank account.
        last4:
          type: string
          example: '6789'
          description: Last 4 digits of the bank account.
        networks:
          description: Supported and preferred bank transfer networks.
          allOf:
            - $ref: '#/components/schemas/PaymentMethodNetworksDto'
        routing_number:
          type: string
          example: '110000000'
          description: Bank routing number.
        status_details:
          type: object
          example: {}
          description: Additional status details if available.
      required:
        - account_holder_type
        - account_type
        - bank_name
        - fingerprint
        - last4
        - networks
        - routing_number
        - status_details
    PaymentMethodPublicDto:
      type: object
      properties:
        id:
          type: string
          example: pm_1Q0PsIJvEtkwdCNYMSaVuRz6
          description: Unique identifier for the payment method.
        object:
          type: string
          example: payment_method
          description: Type of Stripe object.
        allow_redisplay:
          type: string
          example: unspecified
          description: Controls whether the payment method can be redisplayed.
        billing_details:
          description: Billing details associated with the payment method.
          allOf:
            - $ref: '#/components/schemas/PaymentMethodBillingDetailsDto'
        created:
          type: number
          example: 1726673582
          description: Unix timestamp when the payment method was created.
        customer:
          type: string
          nullable: true
          example: null
          description: ID of the attached customer, if any.
        livemode:
          type: boolean
          example: false
          description: Indicates if the object exists in live mode.
        metadata:
          type: object
          example: {}
          description: Set of key-value pairs for storing additional information.
        type:
          type: string
          example: us_bank_account
          description: Payment method type.
        us_bank_account:
          description: US bank account details if the payment method is a bank account.
          allOf:
            - $ref: '#/components/schemas/PaymentMethodUsBankAccountDto'
      required:
        - id
        - object
        - allow_redisplay
        - billing_details
        - created
        - livemode
        - metadata
        - type
    ProductPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: prod_xT4LfvxLMQb4s9uFNIbXf9pm
          format: string
        object:
          type: string
          description: String representing the object’s type.
          example: product
          enum:
            - product
          default: product
        active:
          type: boolean
          description: Indicates whether the object is active.
          example: true
        created:
          type: number
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch
          example: 1760018761
          minimum: 0
        default_price:
          type: string
          nullable: true
          description: >-
            The ID of the Price object that is the default price for this
            product.
          example: price_1SGKTmDZYOQH9uHk1vaSxPKa
          format: string
        description:
          type: string
          nullable: true
          description: Customer-facing description.
          example: null
          maxLength: 255
        name:
          type: string
          description: The name of the product.
          example: Gold Plan
          minLength: 1
          maxLength: 100
        tax_code:
          type: string
          default: txcd_00000000
          description: The tax code for the product.
          example: txcd_10000000
          pattern: ^txcd_[a-zA-Z0-9]+$
        updated:
          type: number
          description: >-
            Time at which the object was last updated. Measured in seconds since
            the Unix epoch.
          example: 1753181495
          minimum: 0
          nullable: true
      required:
        - id
        - object
        - active
        - created
        - name
        - updated
    Recurring:
      type: object
      properties:
        interval:
          type: string
          enum:
            - day
            - week
            - month
            - year
          description: Billing frequency
          example: month
        interval_count:
          type: number
          minimum: 1
          maximum: 365
          description: Number of intervals between billings
          example: 1
          default: 1
      required:
        - interval
        - interval_count
    PriceTypeEnum:
      type: string
      enum:
        - recurring
        - one_time
      description: Price type
    CreateProductPublicDto:
      type: object
      properties:
        currency:
          type: string
          enum:
            - USD
          description: Three-letter ISO currency code
          example: USD
        description:
          type: string
          description: Customer-facing price description
          example: Premium Plan - Monthly
          maxLength: 255
        recurring:
          nullable: true
          description: Recurring components of the price
          allOf:
            - $ref: '#/components/schemas/Recurring'
        tax_behavior:
          type: string
          default: exclusive
          enum:
            - exclusive
            - inclusive
          description: Tax calculation behavior
          example: exclusive
        type:
          description: Price type
          example: one_time
          allOf:
            - $ref: '#/components/schemas/PriceTypeEnum'
        unit_amount:
          type: number
          minimum: 0
          maximum: 99999999
          description: Unit amount in cents
          example: 1000
        name:
          type: string
          description: The product name.
          example: premium_plan
          minLength: 1
          maxLength: 100
        tax_code:
          type: string
          default: txcd_00000000
          enum:
            - txcd_99999999
            - txcd_20030000
            - txcd_10000000
            - txcd_00000000
            - txcd_10010001
            - txcd_10101000
            - txcd_10102000
            - txcd_10102001
            - txcd_10103000
            - txcd_10103001
            - txcd_10103100
            - txcd_10103101
            - txcd_10104001
            - txcd_10201000
            - txcd_10201001
            - txcd_10201002
            - txcd_10201003
            - txcd_10201004
            - txcd_10202000
            - txcd_10202001
            - txcd_10202003
            - txcd_10203000
            - txcd_10203001
            - txcd_10301000
            - txcd_10302000
            - txcd_10302001
            - txcd_10302002
            - txcd_10302003
            - txcd_10303000
            - txcd_10303001
            - txcd_10303002
            - txcd_10303100
            - txcd_10303101
            - txcd_10303102
            - txcd_10303104
            - txcd_10304000
            - txcd_10304001
            - txcd_10304002
            - txcd_10304003
            - txcd_10304100
            - txcd_10304101
            - txcd_10304102
            - txcd_10305000
            - txcd_10305001
            - txcd_10401000
            - txcd_10401001
            - txcd_10401100
            - txcd_10401200
            - txcd_10402000
            - txcd_10402100
            - txcd_10402110
            - txcd_10402200
            - txcd_10402300
            - txcd_10501000
            - txcd_10502000
            - txcd_10503000
            - txcd_10503001
            - txcd_10503002
            - txcd_10503003
            - txcd_10503004
            - txcd_10503005
            - txcd_10504000
            - txcd_10504003
            - txcd_10505000
            - txcd_10505001
            - txcd_10505002
            - txcd_10506000
            - txcd_10506001
            - txcd_10506002
            - txcd_10701000
            - txcd_10701100
            - txcd_10701200
            - txcd_10701300
            - txcd_10701400
            - txcd_10701401
            - txcd_10701410
            - txcd_10701411
            - txcd_10702000
            - txcd_10804001
            - txcd_10804002
            - txcd_10804003
            - txcd_10804010
            - txcd_20010001
            - txcd_20010003
            - txcd_20010004
            - txcd_20010006
            - txcd_20010007
            - txcd_20020009
            - txcd_20020010
            - txcd_20020018
            - txcd_20030002
            - txcd_20030003
            - txcd_20030004
            - txcd_20030005
            - txcd_20040001
            - txcd_20040002
            - txcd_20040003
            - txcd_20040004
            - txcd_20040005
            - txcd_20040006
            - txcd_20040007
            - txcd_20040008
            - txcd_20040009
            - txcd_20040010
            - txcd_20040011
            - txcd_20060000
            - txcd_20060001
            - txcd_20060002
            - txcd_20060008
            - txcd_20060009
            - txcd_20060010
            - txcd_20060013
            - txcd_20060017
            - txcd_20060021
            - txcd_20060022
            - txcd_20060026
            - txcd_20060027
            - txcd_20060029
            - txcd_20060030
            - txcd_20060035
            - txcd_20060040
            - txcd_20060042
            - txcd_20060044
            - txcd_20060045
            - txcd_20060047
            - txcd_20060048
            - txcd_20060049
            - txcd_20060050
            - txcd_20060051
            - txcd_20060052
            - txcd_20060053
            - txcd_20060054
            - txcd_20060055
            - txcd_20060056
            - txcd_20060057
            - txcd_20060058
            - txcd_20060059
            - txcd_20070001
            - txcd_20070006
            - txcd_20070007
            - txcd_20070008
            - txcd_20070010
            - txcd_20070013
            - txcd_20070016
            - txcd_20080003
            - txcd_20080004
            - txcd_20080005
            - txcd_20080007
            - txcd_20080008
            - txcd_20080009
            - txcd_20080010
            - txcd_20080011
            - txcd_20080012
            - txcd_20080013
            - txcd_20090001
            - txcd_20090002
            - txcd_20090003
            - txcd_20090004
            - txcd_20090006
            - txcd_20090010
            - txcd_20090012
            - txcd_20090015
            - txcd_20090018
            - txcd_20090022
            - txcd_20090023
            - txcd_20090024
            - txcd_20090025
            - txcd_20090026
            - txcd_20090027
            - txcd_20090028
            - txcd_20090029
            - txcd_20090030
            - txcd_20090031
            - txcd_20090032
            - txcd_20091000
            - txcd_20091001
            - txcd_20091002
            - txcd_20091003
            - txcd_20091004
            - txcd_20091005
            - txcd_20100001
            - txcd_30011000
            - txcd_30011002
            - txcd_30011003
            - txcd_30011015
            - txcd_30011020
            - txcd_30011028
            - txcd_30011034
            - txcd_30011045
            - txcd_30011100
            - txcd_30011200
            - txcd_30011201
            - txcd_30021000
            - txcd_30021001
            - txcd_30021200
            - txcd_30030001
            - txcd_30031004
            - txcd_30031041
            - txcd_30031404
            - txcd_30031405
            - txcd_30031406
            - txcd_30031407
            - txcd_30031408
            - txcd_30031409
            - txcd_30040003
            - txcd_30040005
            - txcd_30040006
            - txcd_30051302
            - txcd_30060001
            - txcd_30060004
            - txcd_30060005
            - txcd_30060006
            - txcd_30060007
            - txcd_30060010
            - txcd_30060011
            - txcd_30060013
            - txcd_30060014
            - txcd_30060015
            - txcd_30060016
            - txcd_30060017
            - txcd_30060018
            - txcd_30060019
            - txcd_30060020
            - txcd_30060021
            - txcd_30060101
            - txcd_30070001
            - txcd_30070002
            - txcd_30070003
            - txcd_30070004
            - txcd_30070005
            - txcd_30070006
            - txcd_30070007
            - txcd_30070008
            - txcd_30070009
            - txcd_30070010
            - txcd_30070011
            - txcd_30070012
            - txcd_30070013
            - txcd_30070014
            - txcd_30070015
            - txcd_30070017
            - txcd_30070018
            - txcd_30070019
            - txcd_30070020
            - txcd_30070021
            - txcd_30070022
            - txcd_30070023
            - txcd_30070024
            - txcd_30070025
            - txcd_30070026
            - txcd_30070028
            - txcd_30070029
            - txcd_30071000
            - txcd_30080001
            - txcd_30080002
            - txcd_30090005
            - txcd_30090009
            - txcd_30090010
            - txcd_31020001
            - txcd_31020002
            - txcd_31020003
            - txcd_31030001
            - txcd_31030003
            - txcd_31031202
            - txcd_31031203
            - txcd_31031204
            - txcd_31031205
            - txcd_31040001
            - txcd_31040002
            - txcd_31070001
            - txcd_32010001
            - txcd_32010002
            - txcd_32010003
            - txcd_32010004
            - txcd_32020001
            - txcd_32020002
            - txcd_32020003
            - txcd_32020004
            - txcd_32020005
            - txcd_32020006
            - txcd_32020011
            - txcd_32030001
            - txcd_32030002
            - txcd_32030003
            - txcd_32030004
            - txcd_32030005
            - txcd_32030006
            - txcd_32030007
            - txcd_32030008
            - txcd_32030009
            - txcd_32030010
            - txcd_32040002
            - txcd_32040003
            - txcd_32040004
            - txcd_32040005
            - txcd_32050001
            - txcd_32050005
            - txcd_32050006
            - txcd_32050007
            - txcd_32050009
            - txcd_32050012
            - txcd_32050013
            - txcd_32050014
            - txcd_32050015
            - txcd_32050017
            - txcd_32050018
            - txcd_32050019
            - txcd_32050020
            - txcd_32050021
            - txcd_32050022
            - txcd_32050023
            - txcd_32050024
            - txcd_32050025
            - txcd_32050026
            - txcd_32050027
            - txcd_32050028
            - txcd_32050029
            - txcd_32050030
            - txcd_32050031
            - txcd_32050032
            - txcd_32050033
            - txcd_32050034
            - txcd_32050035
            - txcd_32050036
            - txcd_32050037
            - txcd_32050038
            - txcd_32050039
            - txcd_32050040
            - txcd_32050041
            - txcd_32060001
            - txcd_32060002
            - txcd_32060007
            - txcd_32060012
            - txcd_32060017
            - txcd_32060018
            - txcd_32060023
            - txcd_32060024
            - txcd_32060025
            - txcd_32060026
            - txcd_32070003
            - txcd_32070004
            - txcd_32070018
            - txcd_32070019
            - txcd_32070020
            - txcd_32070028
            - txcd_32070029
            - txcd_32070030
            - txcd_32070031
            - txcd_32070032
            - txcd_32070033
            - txcd_32070034
            - txcd_32070035
            - txcd_32070036
            - txcd_32070037
            - txcd_32070038
            - txcd_32070039
            - txcd_32070040
            - txcd_32070041
            - txcd_32070042
            - txcd_32080001
            - txcd_32080003
            - txcd_32080004
            - txcd_32080005
            - txcd_32090003
            - txcd_32090005
            - txcd_32090006
            - txcd_32090007
            - txcd_32090008
            - txcd_32090013
            - txcd_32090014
            - txcd_32090015
            - txcd_32090016
            - txcd_32090017
            - txcd_32090018
            - txcd_32100001
            - txcd_32100002
            - txcd_32100003
            - txcd_32100004
            - txcd_32100005
            - txcd_32100006
            - txcd_32100007
            - txcd_32100008
            - txcd_32100010
            - txcd_32100011
            - txcd_32100012
            - txcd_32100013
            - txcd_33020001
            - txcd_33020002
            - txcd_33020003
            - txcd_33020004
            - txcd_33020005
            - txcd_33020006
            - txcd_33020007
            - txcd_33020008
            - txcd_33020009
            - txcd_33020010
            - txcd_33020011
            - txcd_33020012
            - txcd_33020013
            - txcd_33020014
            - txcd_33020200
            - txcd_33030001
            - txcd_33031001
            - txcd_33080201
            - txcd_33080202
            - txcd_33080300
            - txcd_33080301
            - txcd_33080302
            - txcd_33080303
            - txcd_33080304
            - txcd_33080305
            - txcd_33080306
            - txcd_33080400
            - txcd_33100001
            - txcd_33100101
            - txcd_33100200
            - txcd_33110001
            - txcd_33110002
            - txcd_33110003
            - txcd_33110004
            - txcd_33110005
            - txcd_33120000
            - txcd_33120001
            - txcd_33120002
            - txcd_33120003
            - txcd_33120004
            - txcd_33120005
            - txcd_33120006
            - txcd_33120007
            - txcd_33120008
            - txcd_33120009
            - txcd_33120010
            - txcd_33120011
            - txcd_33120012
            - txcd_33120013
            - txcd_33120014
            - txcd_33120015
            - txcd_33120016
            - txcd_33120017
            - txcd_33120018
            - txcd_33120019
            - txcd_33150001
            - txcd_33150002
            - txcd_33150003
            - txcd_33150004
            - txcd_33150005
            - txcd_33150006
            - txcd_34010001
            - txcd_34010002
            - txcd_34010003
            - txcd_34020001
            - txcd_34020002
            - txcd_34020003
            - txcd_34020004
            - txcd_34020005
            - txcd_34020006
            - txcd_34020027
            - txcd_34021000
            - txcd_34021001
            - txcd_34022000
            - txcd_34022001
            - txcd_34040001
            - txcd_34040002
            - txcd_34040003
            - txcd_34040004
            - txcd_34040005
            - txcd_34040006
            - txcd_34040007
            - txcd_34040008
            - txcd_34040009
            - txcd_34040010
            - txcd_34040011
            - txcd_34040012
            - txcd_34040013
            - txcd_34040014
            - txcd_34040015
            - txcd_34040016
            - txcd_34040017
            - txcd_34040018
            - txcd_35010000
            - txcd_35010001
            - txcd_35010400
            - txcd_35010410
            - txcd_35010500
            - txcd_35020100
            - txcd_35020200
            - txcd_35020220
            - txcd_36010001
            - txcd_36010002
            - txcd_36010003
            - txcd_36010004
            - txcd_36010005
            - txcd_36010006
            - txcd_36010007
            - txcd_37010000
            - txcd_37010003
            - txcd_37010036
            - txcd_37030002
            - txcd_37030003
            - txcd_37040001
            - txcd_37050001
            - txcd_37060001
            - txcd_37060002
            - txcd_37060003
            - txcd_37060008
            - txcd_37060009
            - txcd_37060010
            - txcd_37060011
            - txcd_37060012
            - txcd_37060013
            - txcd_37060035
            - txcd_37060045
            - txcd_37060046
            - txcd_37070001
            - txcd_37070002
            - txcd_37071001
            - txcd_37071002
            - txcd_37071003
            - txcd_37071006
            - txcd_37071007
            - txcd_37071009
            - txcd_37071010
            - txcd_37071011
            - txcd_37071014
            - txcd_37071015
            - txcd_37071101
            - txcd_37071103
            - txcd_37071104
            - txcd_37071106
            - txcd_40010000
            - txcd_40010001
            - txcd_40010002
            - txcd_40020002
            - txcd_40020004
            - txcd_40020005
            - txcd_40020006
            - txcd_40020007
            - txcd_40020008
            - txcd_40040000
            - txcd_40040003
            - txcd_40040004
            - txcd_40040009
            - txcd_40040010
            - txcd_40040013
            - txcd_40040016
            - txcd_40040017
            - txcd_40040019
            - txcd_40040020
            - txcd_40040021
            - txcd_40040022
            - txcd_40050003
            - txcd_40050004
            - txcd_40050005
            - txcd_40050006
            - txcd_40050007
            - txcd_40050008
            - txcd_40050009
            - txcd_40050010
            - txcd_40051001
            - txcd_40051002
            - txcd_40051003
            - txcd_40051004
            - txcd_40060003
            - txcd_40070001
            - txcd_40070002
            - txcd_40070005
            - txcd_40070006
            - txcd_40070007
            - txcd_40090001
            - txcd_40090002
            - txcd_40090005
            - txcd_40090008
            - txcd_40100001
            - txcd_40100002
            - txcd_40100003
            - txcd_40100004
            - txcd_40100010
            - txcd_40100011
            - txcd_40400005
            - txcd_41020001
            - txcd_41020002
            - txcd_41020003
            - txcd_41030001
            - txcd_41030002
            - txcd_41030003
            - txcd_41040002
            - txcd_41040003
            - txcd_41040004
            - txcd_41040005
            - txcd_41040008
            - txcd_41040009
            - txcd_41040010
            - txcd_41040011
            - txcd_41040012
            - txcd_41040013
            - txcd_41040014
            - txcd_41040015
            - txcd_41040016
            - txcd_41040017
            - txcd_41040018
            - txcd_41040019
            - txcd_41040020
            - txcd_41040021
            - txcd_41040022
            - txcd_41040023
            - txcd_41040024
            - txcd_41040025
            - txcd_41040026
            - txcd_41040027
            - txcd_41040028
            - txcd_41040029
            - txcd_41040030
            - txcd_41050001
            - txcd_41050002
            - txcd_41050003
            - txcd_41050004
            - txcd_41050005
            - txcd_41050006
            - txcd_41050007
            - txcd_41050008
            - txcd_41051001
            - txcd_41051002
            - txcd_41052001
            - txcd_41053001
            - txcd_41053002
            - txcd_41054001
            - txcd_41054002
            - txcd_41060003
            - txcd_41060006
            - txcd_50021001
            - txcd_50021002
            - txcd_50021003
            - txcd_50021101
            - txcd_50021103
            - txcd_90000001
            - txcd_90020001
            - txcd_92010001
          description: The tax category for this product
          example: txcd_10000000
          nullable: true
          pattern: ^txcd_[a-zA-Z0-9]+$
      required:
        - currency
        - tax_behavior
        - type
        - unit_amount
        - name
    UpdateProductPublicDto:
      type: object
      properties:
        description:
          type: string
          description: Customer-facing product description
          example: Product description
          maxLength: 255
        name:
          type: string
          description: The product name.
          example: Music
          minLength: 1
          maxLength: 100
        tax_code:
          type: string
          default: txcd_00000000
          enum:
            - txcd_99999999
            - txcd_20030000
            - txcd_10000000
            - txcd_00000000
            - txcd_10010001
            - txcd_10101000
            - txcd_10102000
            - txcd_10102001
            - txcd_10103000
            - txcd_10103001
            - txcd_10103100
            - txcd_10103101
            - txcd_10104001
            - txcd_10201000
            - txcd_10201001
            - txcd_10201002
            - txcd_10201003
            - txcd_10201004
            - txcd_10202000
            - txcd_10202001
            - txcd_10202003
            - txcd_10203000
            - txcd_10203001
            - txcd_10301000
            - txcd_10302000
            - txcd_10302001
            - txcd_10302002
            - txcd_10302003
            - txcd_10303000
            - txcd_10303001
            - txcd_10303002
            - txcd_10303100
            - txcd_10303101
            - txcd_10303102
            - txcd_10303104
            - txcd_10304000
            - txcd_10304001
            - txcd_10304002
            - txcd_10304003
            - txcd_10304100
            - txcd_10304101
            - txcd_10304102
            - txcd_10305000
            - txcd_10305001
            - txcd_10401000
            - txcd_10401001
            - txcd_10401100
            - txcd_10401200
            - txcd_10402000
            - txcd_10402100
            - txcd_10402110
            - txcd_10402200
            - txcd_10402300
            - txcd_10501000
            - txcd_10502000
            - txcd_10503000
            - txcd_10503001
            - txcd_10503002
            - txcd_10503003
            - txcd_10503004
            - txcd_10503005
            - txcd_10504000
            - txcd_10504003
            - txcd_10505000
            - txcd_10505001
            - txcd_10505002
            - txcd_10506000
            - txcd_10506001
            - txcd_10506002
            - txcd_10701000
            - txcd_10701100
            - txcd_10701200
            - txcd_10701300
            - txcd_10701400
            - txcd_10701401
            - txcd_10701410
            - txcd_10701411
            - txcd_10702000
            - txcd_10804001
            - txcd_10804002
            - txcd_10804003
            - txcd_10804010
            - txcd_20010001
            - txcd_20010003
            - txcd_20010004
            - txcd_20010006
            - txcd_20010007
            - txcd_20020009
            - txcd_20020010
            - txcd_20020018
            - txcd_20030002
            - txcd_20030003
            - txcd_20030004
            - txcd_20030005
            - txcd_20040001
            - txcd_20040002
            - txcd_20040003
            - txcd_20040004
            - txcd_20040005
            - txcd_20040006
            - txcd_20040007
            - txcd_20040008
            - txcd_20040009
            - txcd_20040010
            - txcd_20040011
            - txcd_20060000
            - txcd_20060001
            - txcd_20060002
            - txcd_20060008
            - txcd_20060009
            - txcd_20060010
            - txcd_20060013
            - txcd_20060017
            - txcd_20060021
            - txcd_20060022
            - txcd_20060026
            - txcd_20060027
            - txcd_20060029
            - txcd_20060030
            - txcd_20060035
            - txcd_20060040
            - txcd_20060042
            - txcd_20060044
            - txcd_20060045
            - txcd_20060047
            - txcd_20060048
            - txcd_20060049
            - txcd_20060050
            - txcd_20060051
            - txcd_20060052
            - txcd_20060053
            - txcd_20060054
            - txcd_20060055
            - txcd_20060056
            - txcd_20060057
            - txcd_20060058
            - txcd_20060059
            - txcd_20070001
            - txcd_20070006
            - txcd_20070007
            - txcd_20070008
            - txcd_20070010
            - txcd_20070013
            - txcd_20070016
            - txcd_20080003
            - txcd_20080004
            - txcd_20080005
            - txcd_20080007
            - txcd_20080008
            - txcd_20080009
            - txcd_20080010
            - txcd_20080011
            - txcd_20080012
            - txcd_20080013
            - txcd_20090001
            - txcd_20090002
            - txcd_20090003
            - txcd_20090004
            - txcd_20090006
            - txcd_20090010
            - txcd_20090012
            - txcd_20090015
            - txcd_20090018
            - txcd_20090022
            - txcd_20090023
            - txcd_20090024
            - txcd_20090025
            - txcd_20090026
            - txcd_20090027
            - txcd_20090028
            - txcd_20090029
            - txcd_20090030
            - txcd_20090031
            - txcd_20090032
            - txcd_20091000
            - txcd_20091001
            - txcd_20091002
            - txcd_20091003
            - txcd_20091004
            - txcd_20091005
            - txcd_20100001
            - txcd_30011000
            - txcd_30011002
            - txcd_30011003
            - txcd_30011015
            - txcd_30011020
            - txcd_30011028
            - txcd_30011034
            - txcd_30011045
            - txcd_30011100
            - txcd_30011200
            - txcd_30011201
            - txcd_30021000
            - txcd_30021001
            - txcd_30021200
            - txcd_30030001
            - txcd_30031004
            - txcd_30031041
            - txcd_30031404
            - txcd_30031405
            - txcd_30031406
            - txcd_30031407
            - txcd_30031408
            - txcd_30031409
            - txcd_30040003
            - txcd_30040005
            - txcd_30040006
            - txcd_30051302
            - txcd_30060001
            - txcd_30060004
            - txcd_30060005
            - txcd_30060006
            - txcd_30060007
            - txcd_30060010
            - txcd_30060011
            - txcd_30060013
            - txcd_30060014
            - txcd_30060015
            - txcd_30060016
            - txcd_30060017
            - txcd_30060018
            - txcd_30060019
            - txcd_30060020
            - txcd_30060021
            - txcd_30060101
            - txcd_30070001
            - txcd_30070002
            - txcd_30070003
            - txcd_30070004
            - txcd_30070005
            - txcd_30070006
            - txcd_30070007
            - txcd_30070008
            - txcd_30070009
            - txcd_30070010
            - txcd_30070011
            - txcd_30070012
            - txcd_30070013
            - txcd_30070014
            - txcd_30070015
            - txcd_30070017
            - txcd_30070018
            - txcd_30070019
            - txcd_30070020
            - txcd_30070021
            - txcd_30070022
            - txcd_30070023
            - txcd_30070024
            - txcd_30070025
            - txcd_30070026
            - txcd_30070028
            - txcd_30070029
            - txcd_30071000
            - txcd_30080001
            - txcd_30080002
            - txcd_30090005
            - txcd_30090009
            - txcd_30090010
            - txcd_31020001
            - txcd_31020002
            - txcd_31020003
            - txcd_31030001
            - txcd_31030003
            - txcd_31031202
            - txcd_31031203
            - txcd_31031204
            - txcd_31031205
            - txcd_31040001
            - txcd_31040002
            - txcd_31070001
            - txcd_32010001
            - txcd_32010002
            - txcd_32010003
            - txcd_32010004
            - txcd_32020001
            - txcd_32020002
            - txcd_32020003
            - txcd_32020004
            - txcd_32020005
            - txcd_32020006
            - txcd_32020011
            - txcd_32030001
            - txcd_32030002
            - txcd_32030003
            - txcd_32030004
            - txcd_32030005
            - txcd_32030006
            - txcd_32030007
            - txcd_32030008
            - txcd_32030009
            - txcd_32030010
            - txcd_32040002
            - txcd_32040003
            - txcd_32040004
            - txcd_32040005
            - txcd_32050001
            - txcd_32050005
            - txcd_32050006
            - txcd_32050007
            - txcd_32050009
            - txcd_32050012
            - txcd_32050013
            - txcd_32050014
            - txcd_32050015
            - txcd_32050017
            - txcd_32050018
            - txcd_32050019
            - txcd_32050020
            - txcd_32050021
            - txcd_32050022
            - txcd_32050023
            - txcd_32050024
            - txcd_32050025
            - txcd_32050026
            - txcd_32050027
            - txcd_32050028
            - txcd_32050029
            - txcd_32050030
            - txcd_32050031
            - txcd_32050032
            - txcd_32050033
            - txcd_32050034
            - txcd_32050035
            - txcd_32050036
            - txcd_32050037
            - txcd_32050038
            - txcd_32050039
            - txcd_32050040
            - txcd_32050041
            - txcd_32060001
            - txcd_32060002
            - txcd_32060007
            - txcd_32060012
            - txcd_32060017
            - txcd_32060018
            - txcd_32060023
            - txcd_32060024
            - txcd_32060025
            - txcd_32060026
            - txcd_32070003
            - txcd_32070004
            - txcd_32070018
            - txcd_32070019
            - txcd_32070020
            - txcd_32070028
            - txcd_32070029
            - txcd_32070030
            - txcd_32070031
            - txcd_32070032
            - txcd_32070033
            - txcd_32070034
            - txcd_32070035
            - txcd_32070036
            - txcd_32070037
            - txcd_32070038
            - txcd_32070039
            - txcd_32070040
            - txcd_32070041
            - txcd_32070042
            - txcd_32080001
            - txcd_32080003
            - txcd_32080004
            - txcd_32080005
            - txcd_32090003
            - txcd_32090005
            - txcd_32090006
            - txcd_32090007
            - txcd_32090008
            - txcd_32090013
            - txcd_32090014
            - txcd_32090015
            - txcd_32090016
            - txcd_32090017
            - txcd_32090018
            - txcd_32100001
            - txcd_32100002
            - txcd_32100003
            - txcd_32100004
            - txcd_32100005
            - txcd_32100006
            - txcd_32100007
            - txcd_32100008
            - txcd_32100010
            - txcd_32100011
            - txcd_32100012
            - txcd_32100013
            - txcd_33020001
            - txcd_33020002
            - txcd_33020003
            - txcd_33020004
            - txcd_33020005
            - txcd_33020006
            - txcd_33020007
            - txcd_33020008
            - txcd_33020009
            - txcd_33020010
            - txcd_33020011
            - txcd_33020012
            - txcd_33020013
            - txcd_33020014
            - txcd_33020200
            - txcd_33030001
            - txcd_33031001
            - txcd_33080201
            - txcd_33080202
            - txcd_33080300
            - txcd_33080301
            - txcd_33080302
            - txcd_33080303
            - txcd_33080304
            - txcd_33080305
            - txcd_33080306
            - txcd_33080400
            - txcd_33100001
            - txcd_33100101
            - txcd_33100200
            - txcd_33110001
            - txcd_33110002
            - txcd_33110003
            - txcd_33110004
            - txcd_33110005
            - txcd_33120000
            - txcd_33120001
            - txcd_33120002
            - txcd_33120003
            - txcd_33120004
            - txcd_33120005
            - txcd_33120006
            - txcd_33120007
            - txcd_33120008
            - txcd_33120009
            - txcd_33120010
            - txcd_33120011
            - txcd_33120012
            - txcd_33120013
            - txcd_33120014
            - txcd_33120015
            - txcd_33120016
            - txcd_33120017
            - txcd_33120018
            - txcd_33120019
            - txcd_33150001
            - txcd_33150002
            - txcd_33150003
            - txcd_33150004
            - txcd_33150005
            - txcd_33150006
            - txcd_34010001
            - txcd_34010002
            - txcd_34010003
            - txcd_34020001
            - txcd_34020002
            - txcd_34020003
            - txcd_34020004
            - txcd_34020005
            - txcd_34020006
            - txcd_34020027
            - txcd_34021000
            - txcd_34021001
            - txcd_34022000
            - txcd_34022001
            - txcd_34040001
            - txcd_34040002
            - txcd_34040003
            - txcd_34040004
            - txcd_34040005
            - txcd_34040006
            - txcd_34040007
            - txcd_34040008
            - txcd_34040009
            - txcd_34040010
            - txcd_34040011
            - txcd_34040012
            - txcd_34040013
            - txcd_34040014
            - txcd_34040015
            - txcd_34040016
            - txcd_34040017
            - txcd_34040018
            - txcd_35010000
            - txcd_35010001
            - txcd_35010400
            - txcd_35010410
            - txcd_35010500
            - txcd_35020100
            - txcd_35020200
            - txcd_35020220
            - txcd_36010001
            - txcd_36010002
            - txcd_36010003
            - txcd_36010004
            - txcd_36010005
            - txcd_36010006
            - txcd_36010007
            - txcd_37010000
            - txcd_37010003
            - txcd_37010036
            - txcd_37030002
            - txcd_37030003
            - txcd_37040001
            - txcd_37050001
            - txcd_37060001
            - txcd_37060002
            - txcd_37060003
            - txcd_37060008
            - txcd_37060009
            - txcd_37060010
            - txcd_37060011
            - txcd_37060012
            - txcd_37060013
            - txcd_37060035
            - txcd_37060045
            - txcd_37060046
            - txcd_37070001
            - txcd_37070002
            - txcd_37071001
            - txcd_37071002
            - txcd_37071003
            - txcd_37071006
            - txcd_37071007
            - txcd_37071009
            - txcd_37071010
            - txcd_37071011
            - txcd_37071014
            - txcd_37071015
            - txcd_37071101
            - txcd_37071103
            - txcd_37071104
            - txcd_37071106
            - txcd_40010000
            - txcd_40010001
            - txcd_40010002
            - txcd_40020002
            - txcd_40020004
            - txcd_40020005
            - txcd_40020006
            - txcd_40020007
            - txcd_40020008
            - txcd_40040000
            - txcd_40040003
            - txcd_40040004
            - txcd_40040009
            - txcd_40040010
            - txcd_40040013
            - txcd_40040016
            - txcd_40040017
            - txcd_40040019
            - txcd_40040020
            - txcd_40040021
            - txcd_40040022
            - txcd_40050003
            - txcd_40050004
            - txcd_40050005
            - txcd_40050006
            - txcd_40050007
            - txcd_40050008
            - txcd_40050009
            - txcd_40050010
            - txcd_40051001
            - txcd_40051002
            - txcd_40051003
            - txcd_40051004
            - txcd_40060003
            - txcd_40070001
            - txcd_40070002
            - txcd_40070005
            - txcd_40070006
            - txcd_40070007
            - txcd_40090001
            - txcd_40090002
            - txcd_40090005
            - txcd_40090008
            - txcd_40100001
            - txcd_40100002
            - txcd_40100003
            - txcd_40100004
            - txcd_40100010
            - txcd_40100011
            - txcd_40400005
            - txcd_41020001
            - txcd_41020002
            - txcd_41020003
            - txcd_41030001
            - txcd_41030002
            - txcd_41030003
            - txcd_41040002
            - txcd_41040003
            - txcd_41040004
            - txcd_41040005
            - txcd_41040008
            - txcd_41040009
            - txcd_41040010
            - txcd_41040011
            - txcd_41040012
            - txcd_41040013
            - txcd_41040014
            - txcd_41040015
            - txcd_41040016
            - txcd_41040017
            - txcd_41040018
            - txcd_41040019
            - txcd_41040020
            - txcd_41040021
            - txcd_41040022
            - txcd_41040023
            - txcd_41040024
            - txcd_41040025
            - txcd_41040026
            - txcd_41040027
            - txcd_41040028
            - txcd_41040029
            - txcd_41040030
            - txcd_41050001
            - txcd_41050002
            - txcd_41050003
            - txcd_41050004
            - txcd_41050005
            - txcd_41050006
            - txcd_41050007
            - txcd_41050008
            - txcd_41051001
            - txcd_41051002
            - txcd_41052001
            - txcd_41053001
            - txcd_41053002
            - txcd_41054001
            - txcd_41054002
            - txcd_41060003
            - txcd_41060006
            - txcd_50021001
            - txcd_50021002
            - txcd_50021003
            - txcd_50021101
            - txcd_50021103
            - txcd_90000001
            - txcd_90020001
            - txcd_92010001
          description: The tax category for this product
          example: txcd_10000000
          nullable: true
          pattern: ^txcd_[a-zA-Z0-9]+$
      required:
        - name
    TransactionPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: txn_1MiN3gLkdIwHu7ixxapQrznl
        object:
          type: string
          description: String representing the object’s type.
          example: balance_transaction
        amount:
          type: number
          description: Gross amount of this transaction (in cents).
          example: -400
        payment_method:
          type: string
          description: ID of the payment method used in this transaction.
          example: pm_1MiN3gLkdIwHu7ixxYzWqR2b
        balance_type:
          type: string
          description: The balance type of the transaction.
          example: default
        available_on:
          type: number
          description: >-
            The date that the transaction’s net funds become available in the
            Stripe balance.
          example: 1678043844
        created:
          type: number
          description: The date the transaction was created.
          example: 1678043844
        currency:
          type: string
          description: Three-letter ISO currency code.
          example: usd
        description:
          type: string
          description: Description of the transaction.
          example: Transfer to acct_1MiN3gLkdIwHu7ix
        exchange_rate:
          type: number
          description: The exchange rate applied to this transaction.
          example: null
        fee:
          type: number
          description: The fee applied to this transaction (in cents).
          example: 0
        fee_details:
          description: Detailed breakdown of fees (in cents) paid for this transaction.
          example: []
          type: array
          items:
            type: string
        net:
          type: number
          description: The net amount of this transaction (in cents).
          example: -400
        status:
          type: string
          description: The status of the transaction.
          example: available
        type:
          type: string
          description: The type of the transaction.
          example: transfer
      required:
        - id
        - object
        - amount
        - payment_method
        - balance_type
        - available_on
        - created
        - currency
        - fee
        - fee_details
        - net
        - status
        - type
    StatusTransitions:
      type: object
      properties:
        finalized_at:
          type: number
          nullable: true
          description: Timestamp when the invoice was marked as finalized.
          example: 1680645568
        paid_at:
          type: number
          nullable: true
          description: Timestamp when the invoice was marked as paid.
          example: 1680645568
        voided_at:
          type: number
          nullable: true
          description: Timestamp when the invoice was marked as voided.
          example: 1680645568
      required:
        - finalized_at
        - paid_at
        - voided_at
    Taxes:
      type: object
      properties:
        amount:
          type: number
          description: The amount of the tax, in cents.
          example: 150
        tax_behavior:
          type: string
          description: Whether this tax is inclusive or exclusive.
          enum:
            - exclusive
            - inclusive
          example: exclusive
          default: exclusive
        tax_rate:
          type: string
          description: Tax rate id.
          example: txr_1S2tlWDZYOQH9uHkltYEi1ap
        taxable_amount:
          type: number
          description: The amount on which tax is calculated.
          example: 1500
      required:
        - amount
        - tax_behavior
        - tax_rate
        - taxable_amount
    InvoicesPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: a80baa67-1341-4184-b712-b6f9b85b5a2b
          format: string
        object:
          type: string
          description: String representing the object’s type.
          example: invoice
          enum:
            - invoice
          default: invoice
        account_country:
          type: string
          nullable: true
          description: >-
            Country of the account associated with the invoice (only US is
            supported).
          example: US
          enum:
            - US
        account_name:
          type: string
          nullable: true
          description: Name of the account associated with the invoice.
          example: Acme Corp
        amount_due:
          type: number
          description: Final amount due at this time for this invoice (in cents for USD).
          example: 1500
          minimum: 0
        amount_paid:
          type: number
          description: The amount, in cents, that was paid.
          example: 500
          minimum: 0
          nullable: true
        amount_remaining:
          type: number
          description: The difference between amount_due and amount_paid, in cents.
          example: 1000
          minimum: 0
          nullable: true
        attempt_count:
          type: number
          description: Number of payment attempts made for this invoice.
          example: 1
          minimum: 0
          nullable: true
        attempted:
          type: boolean
          description: Whether payment of this invoice was attempted.
          example: true
          nullable: true
        billing_reason:
          type: string
          description: Describes why this invoice was created.
          example: subscription
          enum:
            - subscription
            - manual
          nullable: true
        collection_method:
          type: string
          description: Collection method of this invoice.
          example: charge_automatically
          enum:
            - charge_automatically
            - send_invoice
          nullable: true
        created:
          type: number
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch
          example: 1680645568
          minimum: 0
        currency:
          type: string
          description: Three-letter ISO currency code, in uppercase
          example: USD
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        customer:
          type: string
          description: ID of the customer associated with this invoice.
          example: cus_383fda0065594749023e8c8d
          nullable: true
        customer_address:
          description: The customer’s address.
          allOf:
            - $ref: '#/components/schemas/Address'
        customer_email:
          type: string
          description: Email of the customer associated with the invoice.
          example: john.doe@example.com
          format: email
        customer_name:
          type: string
          description: Name of the customer associated with the invoice.
          example: John Doe
        customer_phone:
          type: string
          description: Phone number of the customer.
          example: '+1234567890'
          nullable: true
        lines:
          type: array
          description: The individual line items that make up the invoice.
        number:
          type: string
          description: >-
            A unique, identifying string that appears on emails sent to the
            customer for this invoice.
          example: INV-1001
        paid:
          type: boolean
          description: Whether payment was successfully collected for this invoice.
          example: true
        period_end:
          type: number
          description: >-
            End of the usage period during which invoice items were added to
            this invoice.
          example: 1680645568
          minimum: 0
          nullable: true
        period_start:
          type: number
          description: >-
            Start of the usage period during which invoice items were added to
            this invoice.
          example: 1680645568
          minimum: 0
          nullable: true
        status:
          type: string
          description: The status of the invoice, one of draft, open, paid, or void.
          example: paid
          enum:
            - draft
            - open
            - paid
            - void
        status_transitions:
          description: The timestamps at which the invoice status was updated.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/StatusTransitions'
        subscription:
          type: string
          description: >-
            The ID of the subscription that this invoice was prepared for, if
            any.
          example: sub_Wm45f5PGQvv67azFeH1z7PO3
          nullable: true
        subtotal:
          type: number
          description: >-
            Total of all subscriptions, invoice items, and prorations on the
            invoice before any invoice level discount or exclusive tax is
            applied
          example: 1500
          minimum: 0
          nullable: true
        subtotal_excluding_tax:
          type: number
          description: >-
            The integer amount in cents representing the subtotal of the invoice
            before any invoice level discount or tax is applied
          example: 1500
          minimum: 0
          nullable: true
        tax:
          type: number
          description: The amount of tax on this invoice.
          example: 150
          minimum: 0
          nullable: true
        total:
          type: number
          description: Total after discounts and taxes.
          example: 1650
          minimum: 0
          nullable: true
        total_excluding_tax:
          type: number
          description: >-
            The integer amount in cents representing the total amount of the
            invoice including all discounts but excluding all tax.
          example: 1500
          minimum: 0
          nullable: true
        total_taxes:
          description: The aggregate amounts calculated per tax rate for all line items.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Taxes'
      required:
        - id
        - object
        - amount_due
        - created
        - currency
        - customer_email
        - customer_name
        - lines
        - number
        - paid
        - status
    ItemsPublicDto:
      type: object
      properties:
        price:
          type: string
          pattern: /^[a-z]+_[a-zA-Z0-9]+$/
          description: The price ID in friendly ID format.
          example: price_4N2gcTPKLGscC1OtN5ICQiIj
        tax:
          description: Array of tax IDs in friendly ID format.
          example:
            - txr_dUhN2gnTAuEyTjHHVBr1eAZ8
          type: array
          items:
            type: string
            pattern: /^[a-z]+_[a-zA-Z0-9]+$/
        quantity:
          type: number
          minimum: 1
          description: The quantity of the product.
          example: 3
      required:
        - price
        - quantity
    CreateInvoicePublicDto:
      type: object
      properties:
        collection_method:
          type: string
          enum:
            - charge_automatically
            - send_invoice
          description: The collection method for this invoice.
          example: charge_automatically
        customer:
          type: string
          description: The ID of the customer for whom the invoice is to be created.
          example: cus_383fda0065594749023e8c8d
        due_date:
          type: number
          description: >-
            The date on which payment for this invoice is due. Valid only for
            invoices where collection_method=send_invoice.
          example: 1672531199
        default_payment_method:
          type: string
          description: >-
            The default payment method to be used for this invoice. Valid only
            for invoices where collection_method=charge_automatically.
          example: pm_1SfME4DZYOQH9uHkDutknty1
        items:
          description: Array of products to be included in the invoice.
          type: array
          items:
            $ref: '#/components/schemas/ItemsPublicDto'
      required:
        - collection_method
        - customer
        - items
    TaxTypeEnum:
      type: string
      enum:
        - Sales tax
        - VAT
        - GST
        - Custom
      description: Type of the tax rate
    TaxesPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: txr_inQ4hbLZPyljDXFRCEnjtEqK
          format: string
        object:
          type: string
          description: String representing the object’s type.
          example: tax_rate
          enum:
            - tax_rate
          default: tax_rate
        active:
          type: boolean
          description: Indicates whether the object is active.
          example: true
        country:
          type: string
          nullable: true
          description: >-
            Two-letter ISO country code representing the country for the tax
            rate (only US is supported)
          example: US
          enum:
            - US
        created:
          type: number
          description: >-
            Timestamp (in seconds since Unix epoch) of when the object was
            created.
          example: 1678833149
          minimum: 0
        description:
          type: string
          nullable: true
          description: >-
            An arbitrary string attached to the object. Often useful for
            displaying to users.
          example: State sales tax
        display_name:
          type: string
          description: The display name of the tax rate, e.g., "Sales Tax".
          example: Sales Tax
        inclusive:
          type: boolean
          description: >-
            Specifies if the tax is inclusive (included in price) or exclusive
            (added on top).
          example: true
        percentage:
          type: number
          description: The tax percentage rate, e.g., 7.25 for 7.25%.
          example: 7.25
          minimum: 0
          maximum: 100
        tax_type:
          description: Type of the tax rate
          example: Custom
          allOf:
            - $ref: '#/components/schemas/TaxTypeEnum'
      required:
        - id
        - object
        - active
        - created
        - display_name
        - inclusive
        - percentage
        - tax_type
    CreateTaxPublicDto:
      type: object
      properties:
        tax_type:
          description: Type of tax rate
          example: Custom
          allOf:
            - $ref: '#/components/schemas/TaxTypeEnum'
        display_name:
          type: string
          description: Display name for the tax rate. Required when tax_type is Custom
          example: Custom Tax Rate
        description:
          type: string
          description: Description of the tax rate
          example: Tax rate for custom purposes
        country:
          type: string
          enum:
            - US
          description: Country code (only US is supported)
          example: US
        percentage:
          type: number
          minimum: 0
          maximum: 100
          description: The tax percentage rate, e.g., 7.25 for 7.25%.
          example: 8.5
        inclusive:
          type: boolean
          default: false
          description: Whether this tax rate is inclusive or exclusive
          example: false
      required:
        - tax_type
        - country
        - percentage
        - inclusive
    UpdateTaxPublicDto:
      type: object
      properties:
        tax_type:
          description: Type of tax rate
          example: Custom
          allOf:
            - $ref: '#/components/schemas/TaxTypeEnum'
        display_name:
          type: string
          description: Display name for the tax rate. Required when tax_type is Custom
          example: Custom Tax Rate
        description:
          type: string
          description: Description of the tax rate
          example: Tax rate for custom purposes
      required:
        - tax_type
    PricePublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
          example: price_1SGKTmDZYOQH9uHk1vaSxPKa
          format: string
        object:
          type: string
          description: String representing the object’s type.
          example: price
          enum:
            - price
          default: price
        active:
          type: boolean
          description: Indicates whether the object is active.
          example: true
        created:
          type: number
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch
          example: 1760018761
          minimum: 0
        currency:
          type: string
          description: Three-letter ISO currency code, in uppercase
          example: USD
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        description:
          type: string
          nullable: true
          description: Customer-facing price description
          example: Premium Plan - Monthly
          maxLength: 255
        product:
          type: string
          description: ID of the product this price is associated with
          example: null
          format: string
        recurring:
          nullable: true
          description: >-
            The recurring components of a price such as interval and
            interval_count. Null if the price is not recurring.
          example:
            interval: month
            interval_count: 1
          allOf:
            - $ref: '#/components/schemas/Recurring'
        tax_behavior:
          type: string
          description: The tax behavior of the product.
          enum:
            - exclusive
            - inclusive
          example: exclusive
          default: exclusive
        type:
          description: >-
            One of one_time or recurring depending on whether the price is for a
            one-time purchase or a recurring (subscription) purchase.
          example: one_time
          allOf:
            - $ref: '#/components/schemas/PriceTypeEnum'
        unit_amount:
          type: number
          nullable: true
          description: >-
            The unit amount in cents to be charged, represented as a whole
            integer if possible.
          example: 1000
          minimum: 0
          maximum: 999999999
        unit_amount_decimal:
          type: string
          nullable: true
          description: Same as unit_amount
          example: '1000'
        link:
          type: string
          description: >-
            Payment link associated with the price for hosted pages or other
            off-session payments.
          nullable: true
      required:
        - id
        - object
        - active
        - created
        - currency
        - product
        - recurring
        - tax_behavior
        - type
        - unit_amount
        - unit_amount_decimal
    CreatePricePublicDto:
      type: object
      properties:
        currency:
          type: string
          enum:
            - USD
          description: Three-letter ISO currency code
          example: USD
        description:
          type: string
          description: Customer-facing price description
          example: Premium Plan - Monthly
          maxLength: 255
        recurring:
          nullable: true
          description: Recurring components of the price
          allOf:
            - $ref: '#/components/schemas/Recurring'
        tax_behavior:
          type: string
          default: exclusive
          enum:
            - exclusive
            - inclusive
          description: Tax calculation behavior
          example: exclusive
        type:
          description: Price type
          example: one_time
          allOf:
            - $ref: '#/components/schemas/PriceTypeEnum'
        unit_amount:
          type: number
          minimum: 0
          maximum: 99999999
          description: Unit amount in cents
          example: 1000
      required:
        - currency
        - tax_behavior
        - type
        - unit_amount
    UpdatePriceDto:
      type: object
      properties:
        description:
          type: string
          description: Customer-facing price description
          example: Premium Plan - Monthly
          maxLength: 255
    SubscriptionItems:
      type: object
      properties:
        object:
          type: string
          description: String representing the object's type.
          example: list
          default: list
        data:
          description: Array of subscription items.
          items:
            type: array
          type: array
        total_count:
          type: number
          description: The total number of subscription items.
          example: 1
          minimum: 0
      required:
        - object
        - data
        - total_count
    SubscriptionsPublicDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the subscription.
          example: sub_2FdhgypnsJQn9mZlY5qGaElL
          pattern: ^[a-z]+_[a-zA-Z0-9]+$
        object:
          type: string
          description: String representing the object's type.
          example: subscription
          enum:
            - subscription
          default: subscription
        billing_cycle_anchor:
          type: number
          description: >-
            Determines the date of the first full invoice, and, for plans with
            month or year intervals, the day of the month for subsequent
            invoices.
          example: 1679609767
          minimum: 0
        cancel_at:
          type: number
          nullable: true
          description: >-
            A date in the future at which the subscription will automatically
            get canceled.
          example: null
        cancel_at_period_end:
          type: boolean
          description: >-
            Whether this subscription will (if status=active) or did (if
            status=canceled) cancel at the end of the current billing period.
          example: false
        canceled_at:
          type: number
          nullable: true
          description: >-
            If the subscription has been canceled, the date of that
            cancellation.
          example: null
        collection_method:
          type: string
          description: Either charge_automatically, or send_invoice.
          example: charge_automatically
          enum:
            - charge_automatically
            - send_invoice
        created:
          type: number
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
          example: 1679609767
          minimum: 0
        currency:
          type: string
          description: Three-letter ISO currency code, in uppercase.
          example: USD
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        customer:
          type: string
          description: ID of the customer who owns the subscription.
          example: cus_739c07713fd4b68565a969cd
        ended_at:
          type: number
          nullable: true
          description: If the subscription has ended, the date the subscription ended.
          example: null
        items:
          description: List of subscription items, each with an attached plan.
          allOf:
            - $ref: '#/components/schemas/SubscriptionItems'
        latest_invoice:
          type: string
          description: The most recent invoice this subscription has generated.
          example: 58d0f1c9-ca00-4998-8e89-d74a290b4df6
        start_date:
          type: number
          description: Date when the subscription was first created.
          example: 1679609767
          minimum: 0
        status:
          type: string
          description: The status of the subscription.
          example: active
          enum:
            - active
            - scheduled
            - canceled
            - expired
            - trialing
        trial_end:
          type: number
          nullable: true
          description: If the subscription has a trial, the end of that trial.
          example: null
        trial_start:
          type: number
          nullable: true
          description: If the subscription has a trial, the beginning of that trial.
          example: null
      required:
        - id
        - object
        - billing_cycle_anchor
        - cancel_at
        - cancel_at_period_end
        - canceled_at
        - collection_method
        - created
        - currency
        - customer
        - ended_at
        - items
        - latest_invoice
        - start_date
        - status
        - trial_end
        - trial_start
    CreateSubscriptionPublicDto:
      type: object
      properties:
        customer:
          type: string
          description: The ID of the customer for whom the invoice is to be created.
          example: cus_e29d2542e2615c78af0d313d
        items:
          description: Array of products to be included in the subscription.
          type: array
          items:
            $ref: '#/components/schemas/ItemsPublicDto'
        trial_days:
          type: number
          minimum: 0
          description: The number of trial days for the subscription.
          example: 14
        start_date:
          type: number
          description: >-
            The day when subscription starts. The `start_date` must be a valid
            Unix timestamp (positive number) in seconds
          example: 1672531199
        end_date:
          type: number
          description: >-
            The day when subscription ends. The `end_date` must be a valid Unix
            timestamp (positive number) in seconds
          example: 1672531199
        start_billing_date:
          type: number
          description: >-
            The day when subscription starts billing. The `start_billing_date`
            must be a valid Unix timestamp (positive number) in seconds
          example: 1672531199
      required:
        - customer
        - items
        - trial_days
        - start_date
    UpdateSubscriptionPublicDto:
      type: object
      properties:
        customer:
          type: string
          description: The ID of the customer for whom the invoice is to be created.
          example: cus_e29d2542e2615c78af0d313d
        items:
          description: Array of products to be included in the subscription.
          type: array
          items:
            $ref: '#/components/schemas/ItemsPublicDto'
        trial_days:
          type: number
          minimum: 0
          description: The number of trial days for the subscription.
          example: 14
        end_date:
          type: number
          description: >-
            The day when subscription ends. The `end_date` must be a valid Unix
            timestamp (positive number) in seconds
          example: 1672531199
      required:
        - customer
        - items
        - trial_days
    SourceTypesDto:
      type: object
      properties:
        card:
          type: number
          description: Total amount coming from card payments.
          example: 358511
        bank_account:
          type: number
          description: Total amount coming from legacy US ACH payments.
          example: 0
        fpx:
          type: number
          description: Total amount coming from FPX payments.
          example: 0
      required:
        - card
    BalanceItemDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount of funds available or pending in this currency.
          example: 358511
        currency:
          type: string
          description: Three-letter ISO currency code.
          example: usd
        source_types:
          description: Breakdown of the balance by payment source type.
          example:
            card: 4097256
          allOf:
            - $ref: '#/components/schemas/SourceTypesDto'
      required:
        - amount
        - currency
        - source_types
    PrefundingItemDto:
      type: object
      properties:
        amount:
          type: number
          description: Amount of prefunding for this currency.
          example: 0
        currency:
          type: string
          description: Currency of the prefunded amount.
          example: pln
      required:
        - amount
        - currency
    RefundAndDisputePrefundingDto:
      type: object
      properties:
        available:
          description: List of available prefunded balances for refunds and disputes.
          example:
            - amount: 0
              currency: usd
          type: array
          items:
            $ref: '#/components/schemas/PrefundingItemDto'
        pending:
          description: List of pending prefunded balances for refunds and disputes.
          example:
            - amount: 0
              currency: usd
          type: array
          items:
            $ref: '#/components/schemas/PrefundingItemDto'
      required:
        - available
        - pending
    BalancePublicDto:
      type: object
      properties:
        object:
          type: string
          description: Type of object returned by Stripe.
          example: balance
        available:
          description: List of balances available for payout.
          example:
            - amount: 4097256
              currency: usd
              source_types:
                card: 4097256
          type: array
          items:
            $ref: '#/components/schemas/BalanceItemDto'
        pending:
          description: List of pending (not yet available) balance amounts.
          example:
            - amount: 5169
              currency: usd
              source_types:
                card: 5169
          type: array
          items:
            $ref: '#/components/schemas/BalanceItemDto'
        livemode:
          type: boolean
          description: >-
            Indicates whether the balance belongs to a live (production)
            account.
          example: false
        refund_and_dispute_prefunding:
          description: Details about prefunded amounts for refunds and disputes.
          example:
            available:
              - amount: 0
                currency: usd
            pending:
              - amount: 0
                currency: usd
          allOf:
            - $ref: '#/components/schemas/RefundAndDisputePrefundingDto'
      required:
        - object
        - available
        - pending
        - livemode
        - refund_and_dispute_prefunding
    AttachPaymentMethodPublicRequestDto:
      type: object
      properties:
        customerId:
          type: string
          description: ID of the customer to attach the payment method to
          example: cust_123456789
      required:
        - customerId
